/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.toools.gwt.wmc.client.application.gui;

import org.toools.gwt.widget.client.bc.BasicControl;
import org.toools.gwt.widget.client.bc.BasicList;
import org.toools.gwt.widget.client.cloud.TagRenderer;
import org.toools.gwt.widget.client.cloud.TagVO;
import org.toools.gwt.wmc.jpa.Application;

/**
 *
 * @author manuel
 */
public class ApplicationList extends BasicList{

    public ApplicationList(TagVO[] data, BasicControl bc) {
		super(data, bc);
	}

    @Override
	public TagRenderer createTagRenderer(TagVO tag) {
		return new ApplicationListRenderer(tag, getBasicControl());
	}

	public boolean filter(TagVO tag) {
		Application ad = (Application) tag.getAttachedBusinessObject();
		if(ad.getContent().toLowerCase().contains(getFilter().toLowerCase())) {
			return true;
		}
		else {return false;}
	}
}
